package com.hongmeng.teamwork.config;

import com.lark.oapi.Client;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@EnableConfigurationProperties(FeishuProperties.class)
@Configuration
public class FeishuConfig {

    @Bean
    public Client client(FeishuProperties properties) {
        return Client.newBuilder(properties.getAppId(), properties.getAppSecret())
                .build();
    }
}
